/**   
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-12-09 17:24:08  
 * Copyright (c) 2015- joysuch-版权所有     
 */

package com.joysuch.wwyt.bp.entity;

import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;

import static javax.persistence.GenerationType.IDENTITY;

@EntityListeners({ AuditingEntityListener.class, AutoSetCommonFieldListener.class })
@Entity
@Table(name = "wwyt_bp_exam_standard")
@SQLDelete(sql="update wwyt_bp_exam_standard set DELETE_FLAG = '1' where id= ?")
@SQLDeleteAll(sql="update wwyt_bp_exam_standard set DELETE_FLAG = '1' where id= ?")
@Where(clause="DELETE_FLAG = '0'")

public class BpExamStandard implements java.io.Serializable{
    
    //columns START
    //ID，主键
    private Long id;
    //考核标准名称
    private String examName;
    //考核标准编号
    private String num;
    //制定人ID
    private Long makerId;
    //制定时间
    private java.util.Date makeTime;
    //考核项目集合
    private String itemExam;
    //状态
    private Integer status;
    //考核条例总分
    private String itemTotalScore;
    //审核人ID
    private Long auditUserId;
    //审核时间
    private java.util.Date auditTime;
    //审核意见
    private String auditRemark;
    //创建人
    private Long createBy;
    //创建时间
    private java.util.Date createTime;
    //更新人
    private Long updateBy;
    //更新时间
    private java.util.Date updateTime;
    //删除标记
    private String deleteFlag;
    //组织机构代码
    private String orgCode;
    //租户
    private Long tenentId;
    // 部门ID
    private Long departId;
    //columns END


    public void setId(Long value) {
        this.id = value;
    }
    
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "Id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }
    
     
    @Column(name = "EXAM_NAME", length = 100)
    public String getExamName() {
        return this.examName;
    }
    
    public void setExamName(String value) {
        this.examName = value;
    }
    
     
    @Column(name = "NUM", length = 10)
    public String getNum() {
        return this.num;
    }
    
    public void setNum(String value) {
        this.num = value;
    }
    
     
    @Column(name = "MAKER_ID")
    public Long getMakerId() {
        return this.makerId;
    }
    
    public void setMakerId(Long value) {
        this.makerId = value;
    }
    
     
    @Column(name = "MAKE_TIME")
    public java.util.Date getMakeTime() {
        return this.makeTime;
    }
    
    public void setMakeTime(java.util.Date value) {
        this.makeTime = value;
    }
    
     
    @Column(name = "ITEM_EXAM", length = 500)
    public String getItemExam() {
        return this.itemExam;
    }
    
    public void setItemExam(String value) {
        this.itemExam = value;
    }
    
     
    @Column(name = "STATUS")
    public Integer getStatus() {
        return this.status;
    }
    
    public void setStatus(Integer value) {
        this.status = value;
    }
    
     
    @Column(name = "ITEM_TOTAL_SCORE")
    public String getItemTotalScore() {
        return this.itemTotalScore;
    }
    
    public void setItemTotalScore(String value) {
        this.itemTotalScore = value;
    }
    
     
    @Column(name = "AUDIT_USER_ID")
    public Long getAuditUserId() {
        return this.auditUserId;
    }
    
    public void setAuditUserId(Long value) {
        this.auditUserId = value;
    }
    
     
    @Column(name = "AUDIT_TIME")
    public java.util.Date getAuditTime() {
        return this.auditTime;
    }
    
    public void setAuditTime(java.util.Date value) {
        this.auditTime = value;
    }
    
     
    @Column(name = "AUDIT_REMARK", length = 200)
    public String getAuditRemark() {
        return this.auditRemark;
    }
    
    public void setAuditRemark(String value) {
        this.auditRemark = value;
    }
    
     
    @org.springframework.data.annotation.CreatedBy
    @Column(name = "CREATE_BY")
    public Long getCreateBy() {
        return this.createBy;
    }
    
    public void setCreateBy(Long value) {
        this.createBy = value;
    }
    
     
    @org.springframework.data.annotation.CreatedDate
    @Column(name = "CREATE_TIME")
    public java.util.Date getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(java.util.Date value) {
        this.createTime = value;
    }
    
     
    @org.springframework.data.annotation.LastModifiedBy
    @Column(name = "UPDATE_BY")
    public Long getUpdateBy() {
        return this.updateBy;
    }
    
    public void setUpdateBy(Long value) {
        this.updateBy = value;
    }
    
     
    @org.springframework.data.annotation.LastModifiedDate
    @Column(name = "UPDATE_TIME")
    public java.util.Date getUpdateTime() {
        return this.updateTime;
    }
    
    public void setUpdateTime(java.util.Date value) {
        this.updateTime = value;
    }
    
     
    @Column(name = "DELETE_FLAG", length = 2)
    public String getDeleteFlag() {
        return this.deleteFlag;
    }
    
    public void setDeleteFlag(String value) {
        this.deleteFlag = value;
    }
    
     
    @Column(name = "ORG_CODE", length = 100)
    public String getOrgCode() {
        return this.orgCode;
    }
    
    public void setOrgCode(String value) {
        this.orgCode = value;
    }
    
     
    @Column(name = "TENENT_ID")
    public Long getTenentId() {
        return this.tenentId;
    }
    
    public void setTenentId(Long value) {
        this.tenentId = value;
    }

    @Column(name = "DEPART_ID")
    public Long getDepartId() {
        return this.departId;
    }

    public void setDepartId(Long departId) {
        this.departId = departId;
    }


    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id",getId())
            .append("examName",getExamName())
            .append("num",getNum())
            .append("makerId",getMakerId())
            .append("makeTime",getMakeTime())
            .append("itemExam",getItemExam())
            .append("status",getStatus())
            .append("itemTotalScore",getItemTotalScore())
            .append("auditUserId",getAuditUserId())
            .append("auditTime",getAuditTime())
            .append("auditRemark",getAuditRemark())
            .append("createBy",getCreateBy())
            .append("createTime",getCreateTime())
            .append("updateBy",getUpdateBy())
            .append("updateTime",getUpdateTime())
            .append("deleteFlag",getDeleteFlag())
            .append("orgCode",getOrgCode())
            .append("tenentId",getTenentId())
            .append("departId",getDepartId())
            .toString();
    }
    
    public int hashCode() {
        return new HashCodeBuilder()
            .append(getId())
            .toHashCode();
    }
    
    public boolean equals(Object obj) {
        if(obj instanceof BpExamStandard == false) return false;
        if(this == obj) return true;
        BpExamStandard other = (BpExamStandard)obj;
        return new EqualsBuilder()
            .append(getId(),other.getId())
            .isEquals();
    }
}

